﻿using CommunityToolkit.Mvvm.ComponentModel;
using FreeSql.DataAnnotations;
using System.ComponentModel;
using ZoneLine.Common;
using ZoneLine.Views;

namespace ZoneLine.Models
{
    [Index(nameof(QOP006StationResult) + "index_1", nameof(AbsScanCode), IsUnique = false)]
    public class QOP006StationResult : StationResultBase
    {
        private string _armScanCode;
        private string _nutScanCode;
        private string _boltScanCode;
        private string _partType;
        private string _result;
        private float _tightenTorque;
        private float _tightenAngle;
        private float _tightenPosition;
        private float _cycleTime;

        [DgColumnAttr("下叉臂批次码")]
        public string ArmScanCode
        {
            get { return _armScanCode; }
            set { SetProperty(ref _armScanCode, value); }
        }

        [DgColumnAttr("螺母批次码")]
        public string NutScanCode
        {
            get { return _nutScanCode; }
            set { SetProperty(ref _nutScanCode, value); }
        }

        [DgColumnAttr("螺栓批次码")]
        public string BoltScanCode
        {
            get { return _boltScanCode; }
            set { SetProperty(ref _boltScanCode, value); }
        }

        [DgColumnAttr("产品型号")]
        public string PartType
        {
            get { return _partType; }
            set { SetProperty(ref _partType, value); }
        }

        [DgColumnAttr("结果")]
        public string Result
        {
            get { return _result; }
            set { SetProperty(ref _result, value); }
        }

        [DgColumnAttr("拧紧扭矩")]
        public float TightenTorque
        {
            get { return _tightenTorque; }
            set { SetProperty(ref _tightenTorque, value); }
        }

        [DgColumnAttr("拧紧角度")]
        public float TightenAngle
        {
            get { return _tightenAngle; }
            set { SetProperty(ref _tightenAngle, value); }
        }

        [DgColumnAttr("拧紧位移")]
        public float TightenPosition
        {
            get { return _tightenPosition; }
            set { SetProperty(ref _tightenPosition, value); }
        }

        [DgColumnAttr("循环时间")]
        public float CycleTime
        {
            get { return _cycleTime; }
            set { SetProperty(ref _cycleTime, value); }
        }

        private string _armScanCode2;

        /// <summary>
        /// 下叉臂批次码2
        /// </summary>
        [DgColumnAttr("下叉臂批次码2")]
        public string ArmScanCode2
        {
            get { return _armScanCode2; }
            set => SetProperty(ref _armScanCode2, value);
        }

        private string _nutScanCode2;

        /// <summary>
        /// 螺母批次码2
        /// </summary>
        [DgColumnAttr("螺母批次码2")]
        public string NutScanCode2
        {
            get { return _nutScanCode2; }
            set => SetProperty(ref _nutScanCode2, value);
        }

        private string _boltScanCode2;

        /// <summary>
        /// 螺栓批次码2
        /// </summary>
        [DgColumnAttr("螺栓批次码2")]
        public string BoltScanCode2
        {
            get { return _boltScanCode2; }
            set => SetProperty(ref _boltScanCode2, value);
        }
    }
}